<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE hibernate-mapping PUBLIC
    "-//Hibernate/Hibernate Mapping DTD 3.0//EN" 
    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping>
    <class name="cn.firstsoft.modules.loge.domain.LogeRoomCharge" table="loge_room_charge">
        <id name="id" type="integer">
            <column name="id" />
            <generator class="native" >
				<param name="sequence">LOGE_ROOM_CHARGE_ID_SEQ</param>
            </generator>
        </id>
        <property name="charge" type="double">
           <column name="charge"/>
        </property>
        <property name="year" type="integer">
            <column name="year"/>
        </property>
        <property name="month" type="integer">
            <column name="month"/>
        </property>
        <property name="rem" type="string">
           <column name="rems" length="250"/>
        </property>
          <property name="chargeUserDay" type="double">
           <column name="charge_user_day"/>
        </property>
        <property name="payCharge" type="double">
           <column name="pay_charge"/>
        </property>
         <many-to-one name="logeRoom" class="cn.firstsoft.modules.loge.domain.LogeRoom" fetch="select">
        <column name="room_id"/>
        </many-to-one>
         <set name="logeRoomChargeitem" inverse="true" cascade="all" order-by="id asc">
            <key>
                <column name="charge_id" />
            </key>
            <one-to-many class="cn.firstsoft.modules.loge.domain.LogeRoomChargeitem"/>
        </set>
         <set name="logeUserCharge" inverse="true" cascade="all">
            <key>
                <column name="charge_id" />
            </key>
            <one-to-many class="cn.firstsoft.modules.loge.domain.LogeUserCharge"/>
        </set>
    </class>
</hibernate-mapping>
